home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 135 / 135.d81 / demo code (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  148 lines

  1. 0 (NULL)1,0,1:(NULL):(NULL)1,0,1
  2. 1 (NULL) 4,1,1,24,14,30,14,30,46,24,46
  3. 2 (NULL)11,1,1,30,14,52,14,52,25,47,30,52,35,52,46,30,46,30,40,42,40,42,20,30,20
  4. 3 (NULL)4,2,1,59,14,65,14,65,46,59,46
  5. 4 (NULL)10,2,1,65,14,87,14,87,46,77,46,77,33,65,33,65,27,77,27,77,20,65,20
  6. 5 (NULL)8,3,1,94,14,122,14,122,20,100,20,100,27,122,27,122,33,94,33
  7. 6 (NULL)6,3,1,116,33,122,33,122,46,94,46,94,40,116,40
  8. 7 (NULL)4,4,1,129,14,157,14,157,20,129,20
  9. 8 (NULL)8,4,1,129,40,140,40,140,20,146,20,146,40,157,40,157,46,129,46
  10. 9 (NULL)8,5,1,164,14,192,14,192,20,170,20,170,40,192,40,192,46,164,46
  11. 10 (NULL)4,6,1,210,14,216,14,216,46,210,46
  12. 11 (NULL)4,6,1,199,27,227,27,227,33,199,33
  13. 12 (NULL)8,7,1,234,14,262,14,262,20,240,20,240,27,262,27,262,33,234,33
  14. 13 (NULL)6,7,1,234,40,256,40,256,33,262,33,262,46,234,46
  15. 14 (NULL)6,8,1,269,14,291,14,291,20,275,20,275,46,269,46
  16. 15 (NULL)6,8,1,291,14,297,14,297,46,275,46,275,40,291,40,291,14
  17. 16 (NULL)5,7,"[193]dds 50 [195]ommands and [198]unctions"
  18. 17 (NULL)6,8,"[212]o the [195]64 [194]asic [201]nterpreter"
  19. 18 goto21
  20. 19 rem subr clear
  21. 20 forde=1to1000:next:(NULL)4,0,2,0,100,319,100,319,199,0,199:return
  22. 21 (NULL)8,10,"[200]igh [210]es [199]raphics: plot"
  23. 22 forx=100to220
  24. 23 (NULL)1,1,x,145-40*sin(x/10)
  25. 24 next
  26. 25 :
  27. 26 gosub20:(NULL)8,10,"[159][200]igh [210]es [199]raphics: line"
  28. 27 forx=1to40
  29. 28 (NULL) 1,1,10+(NULL)(300),100+(NULL)(99),10+(NULL)(300),100+(NULL)(99)
  30. 29 next
  31. 30 :
  32. 31 gosub20:(NULL)8,10,"[156][200]igh [210]es [199]raphics: paint"
  33. 32 forx=1to15
  34. 33 a=10+(NULL)(300):b=100+(NULL)(90)
  35. 34 c=10+(NULL)(300):d=100+(NULL)(90)
  36. 35 e=10+(NULL)(300):f=100+(NULL)(90)
  37. 36 (NULL)3,x,1,a,b,c,d,e,f
  38. 37 next
  39. 38 :
  40. 39 gosub20:(NULL)8,10,"[200]igh [210]es [199]raphics: circle"
  41. 40 n=1:p=6:forx=0to14
  42. 41 (NULL) x+1,1,p,150,n
  43. 42 p=p+n*1.25:n=n+1:p=p+n*1.25+4
  44. 43 next
  45. 44 (NULL)7,1,160,300,209
  46. 45 forde=1to1000:next
  47. 46 (NULL)0
  48. 47 (NULL) 10,1,"[205][213][204][212][201][195][207][204][207][210] [199][210][193][208][200][201][195][211]"
  49. 48 k=10*(NULL)/180
  50. 49 forx=60to100
  51. 50 (NULL)2,1,x,110+40*sin((x)*k)
  52. 51 (NULL)7,2,x,110+40*sin((x+120)*k)
  53. 52 (NULL)6,3,x,110+40*sin((x+240)*k)
  54. 53 next
  55. 54 forx=1to100
  56. 55 (NULL) 1+(NULL)(14),1+(NULL)(2),(NULL)(159),(NULL)(199),(NULL)(159),(NULL)(199)
  57. 56 next
  58. 57 forx=1to40
  59. 58 a=(NULL)(159):b=(NULL)(199)
  60. 59 c=(NULL)(159):d=(NULL)(199)
  61. 60 e=(NULL)(159):f=(NULL)(199)
  62. 61 (NULL)3,1+(NULL)(14),1+(NULL)(2),a,b,c,d,e,f
  63. 62 next
  64. 63 (NULL)7,1,80,100,150
  65. 64 forx=1to40
  66. 65 (NULL)1+(NULL)(14),1+(NULL)(2),(NULL)(159),(NULL)(199),(NULL)(200)
  67. 66 next:forde=1to1000:next
  68. 67 print"[147][158]                 sound"
  69. 68 (NULL):forde=1to500:next
  70. 69 fory=1to3
  71. 70 forx=1to4
  72. 71 (NULL)2
  73. 72 forde=1to70:next
  74. 73 next
  75. 74 forde=1to100:next
  76. 75 next
  77. 76 forx=1to2
  78. 77 (NULL)1
  79. 78 forde=1to300:next
  80. 79 next
  81. 80 forx=1to5
  82. 81 (NULL)7
  83. 82 forde=1to400:next
  84. 83 next
  85. 84 (NULL)4
  86. 85 forde=1to2000:next
  87. 86 print"[156]             ";
  88. 87 print"and sprites..."
  89. 88 forx=0to62:poke13*64+x,255:next
  90. 89 (NULL)
  91. 90 forx=0to7:(NULL)x,0,0:(NULL)x,0
  92. 91 (NULL)x,x+1
  93. 92 (NULL)x,(NULL),(NULL),(NULL),(NULL)
  94. 93 (NULL)x,12,50,159,229
  95. 94 (NULL) (NULL)x,0,0,0,0
  96. 95 (NULL)x,0,100:(NULL)x,8
  97. 96 (NULL)x,128:(NULL)x,13,0,0
  98. 97 next
  99. 98 forx=0to7:(NULL)x:forde=1to50:next
  100. 99 next
  101. 100 (NULL)(NULL)0,0,0,0,2
  102. 101 print"";tab(13);"press any key"
  103. 102 poke$c6,0
  104. 103 getk$:ifk$=""then103
  105. 104 (NULL)
  106. 105 print"[147]    basic+50 also provides commands"
  107. 106 print"     and functions for programming"
  108. 107 print"   renumber";
  109. 108 print tab(23);"word peek()"
  110. 109 print"   delete";
  111. 110 print tab(23);"high()"
  112. 111 print"   merge";
  113. 112 print tab(23);"low()"
  114. 113 print"   disk load";
  115. 114 print tab(23);"integer[160]rnd()"
  116. 115 print"   disk save"
  117. 116 print"   hex print"
  118. 117 print"   word poke"
  119. 118 print"";tab(13);"press any key"
  120. 119 poke$c6,0
  121. 120 getk$:ifk$=""then120
  122. 121 print"[147]   and you can use hex numbers freely."
  123. 122 print"   the following are valid statements"
  124. 123 print"   with basic+50 active:"
  125. 124 print"   wpoke $37,$4000
  126. 125 [153]"   sys $c000"
  127. 126 [153]"   hprint wpeek($0314)"
  128. 127 [153]"   let x = (x and $aa) or $55
  129. 128 print"";tab(13);"press any key"
  130. 129 poke$c6,0
  131. 130 getk$:ifk$=""then130
  132. 131 print"[147]"
  133. 132 (NULL)14,6,14:print"[147]"
  134. 150 print"[147]disable"
  135. 160 print"run40000
  136. 170 [153]""
  137. 180 [151]631,13:[151]632,13:[151]198,2:[128]
  138. 40000 [129]i[178]0[164]21:[151]828[170]i,8[170]i:[130]
  139. 40010 [139]dv[179]8[176]dv[177]29[176]dv[178]8[167]40030
  140. 40020 a[178][194](828):b[178][194](828[170]dv[171]8):[151]828,b:[151]828[170]dv[171]8,a
  141. 40030 a$[178]"hello connect":[129]j[178]8[164]29:i[178][194](828[170]j[171]8):[139]i[178]14[167][130]
  142. 40040 [160]2:[159]2,i,2:[160]2:[139]st[167]40060
  143. 40050 [160]15:[159]15,i,15,"r0:"[170]a$[170]"="[170]a$:[132]15,er:[160]15:[139]er[178]63[167]40070
  144. 40060 [130]:[153]"load":[151]53272,23:[151]186,8:[151]2048,0:[151]44,8:[151]44,1:[128]
  145. 40070 q$[178][199](34):[151]646,[194](53281):[153]"load":[151]53272,23
  146. 40080 [153]"loadp(NULL)2048,0:p(NULL)44,8:p(NULL)43,1:p(NULL)56,160:p(NULL)55,0:clr:l(NULL)"q$a$q$","i
  147. 40090 [153]"run:":[151]631,13:[151]632,13:[151]198,2:[128]
  148.